import { Pipe, PipeTransform } from '@angular/core';
import { TaskType } from '../services/task.service';

@Pipe({
  name: 'taskType'
})
export class TaskTypePipe implements PipeTransform {
  transform(value: any, args?: any): any {
    switch (value) {
      case TaskType.All:
        return "全部任务类型";
      case TaskType.SystemUpgrade:
        return "系统更新";
      case TaskType.SoftwareUpgrade:
        return "软件更新";
      case TaskType.Policy:
        return "配置更新";
      case TaskType.Message:
        return "下发消息";
      case TaskType.Script:
        return "下发脚本";
      case TaskType.UsbAuth:
        return "USB授权"
      case TaskType.DetelePc:
        return "删除终端"
      case TaskType.Client:
        return "客户端更新"
    }
    return value;
  }

}
